package com.gzc.pm.dao;

import java.util.HashMap;
import java.util.List;

import com.gzc.pm.bean.DetectioncardBean;

import cn.skyclass.ibatis.IBatisDao;
import cn.skyclass.net.OperationResult;

public class DetectionCardDao {

	private IBatisDao dao = new IBatisDao();
	
	@SuppressWarnings("unchecked")
	public List<DetectioncardBean> getByPrId(int prId, String sDateStr,
			String eDateStr) {
		HashMap<String, Object> map = new HashMap<String, Object>();
		map.put("prId", prId);
		map.put("sDateStr", sDateStr);
		map.put("eDateStr", eDateStr);
		
		List<DetectioncardBean> list1 = dao.getList("Detectioncard.getByPrId", map);
		return list1;
	}
	
	@SuppressWarnings("unchecked")
	public List<DetectioncardBean> getInPrIds(String prIdsStr, String sDateStr, String eDateStr){
		HashMap<String, Object> map = new HashMap<String, Object>();
		map.put("prIdsStr", prIdsStr);
		map.put("sDateStr", sDateStr);
		map.put("eDateStr", eDateStr);
		
		List<DetectioncardBean> list1 = dao.getList("Detectioncard.getInPrIds", map);
		return list1;
	}
	
	public OperationResult add(DetectioncardBean bean){
		return dao.executeInsert("Detectioncard.add", bean);
	}

	
}
